<template>
  <div id="app">
    <transition name="fade" mode="out-in">
      <router-view></router-view>
      <!-- <keep-alive>
          <router-view v-if="$route.meta.keepAlive" />
        </keep-alive>
        <router-view v-if="!$route.meta.keepAlive" /> -->
    </transition>
  </div>
</template>
<script>
import { mapActions } from "vuex";
// import { Notify } from "vant";
export default {
  methods: {
    ...mapActions(["loadIP"]),
  },
  // created() {
  //   this.loadIP().catch((e) => {
  //     if (e === "unset") {
  //       Notify({ type: "warning", message: "ip地址未设置，请设置ip地址" });
  //     } else {
  //       Notify({ type: "danger", message: e });
  //     }
  //   });
  // },
};
</script>
<style lang="less">
@import "assets/less/comm";
html,
body,
div {
  padding: 0;
  margin: 0;
}
html,
body {
  height: 100%;
  font-size: 16px;
}
body {
  background-color: #f7f8fa;
}
#app {
  height: 100%;
}
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.15s ease;
}
.fade-enter,
.fade-leave-active {
  opacity: 0;
}
</style>
